New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

urltoany

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urltoany

Convert any URL to Markdown, Text, HTML, or JSON. A lightweight utility for extracting web content.

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

urltoany

npm version npm downloads license

Convert any URL to Markdown, Text, HTML, or JSON. Zero dependencies, TypeScript-first.

Try the full web version at urltoany.com — with 12+ conversion formats, AI summarization, SEO analysis, and more.

Install

npm install urltoany

Usage

import { toMarkdown, toText, toHTML, toJSON } from 'urltoany'

// Get page content as Markdown
const markdown = await toMarkdown('https://example.com')

// Get plain text
const text = await toText('https://example.com')

// Get cleaned HTML
const html = await toHTML('https://example.com')

// Get structured JSON (title, description, content, etc.)
const json = await toJSON('https://example.com')

Options

All functions accept an optional second argument:

const markdown = await toMarkdown('https://example.com', {
  timeout: 60000, // request timeout in ms (default: 30000)
  headers: {      // custom headers
    'Accept-Language': 'en-US',
  },
})

API

toMarkdown(url, options?): Promise<string>

Extracts the main content from a URL and returns it as Markdown.

toText(url, options?): Promise<string>

Extracts plain text content from a URL, stripped of all formatting.

toHTML(url, options?): Promise<string>

Returns the cleaned HTML content from a URL.

toJSON(url, options?): Promise<JsonResult>

Returns structured data including title, description, URL, and content.

interface JsonResult {
  title: string
  description: string
  url: string
  content: string
  [key: string]: unknown
}

Requirements

  • Node.js >= 18 (uses native fetch)

More Features

Need more? urltoany.com offers:

  • URL to PDF & Image (screenshots)
  • URL to QR Code
  • AI-powered content summarization
  • SEO analysis (headings, meta tags)
  • URL extraction from sitemaps
  • And more — all free, no registration required

License

MIT

Keywords

url

FAQs

Package last updated on 02 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts