npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ryangarber/markitdown-ts

v0.1.5

Published

Convert various file formats to Markdown for indexing, text analysis, and other applications that benefit from structured text. Node-free fork of the TypeScript fork of the original Python library.

Readme

markitdown-ts

markitdown-ts converts various file types to Markdown without filesystem, process, stream, or any other runtime-specific dependencies. It can run in browsers, workers, edge functions, and all other modern JavaScript environments.

Supported formats

  • Plain text, Markdown, CSV, and JSON
  • HTML
  • XML, RSS, and Atom feeds
  • Jupyter notebooks (.ipynb)
  • Word documents (.docx)
  • Excel workbooks (.xlsx)
  • PowerPoint presentations (.pptx)
  • PDF documents (.pdf)
  • ZIP archives (.zip), with nested files converted recursively
  • Wikipedia, YouTube metadata, and Bing result pages supplied as HTML

Audio, image metadata, local-path, and YouTube transcript features from the original project are intentionally left out because their implementations depended on runtime-specific modules, binaries, streams, or filesystem access. They may be added back over time as alternative implementations are found. Want to see one added? Contributions are welcome!

Installation

pnpm install @ryangarber/markitdown-ts

Usage

import { MarkItDown } from "@ryangarber/markitdown-ts";

const bytes: Uint8Array = /* plain bytes */;

const result = await new MarkItDown().convert(bytes, {
  file_extension: ".txt"
});

console.log(result?.markdown);

The same convert method accepts:

  • Uint8Array
  • ArrayBuffer and SharedArrayBuffer
  • DataView or any other typed array
  • Blob and File
  • Response

A file_extension is required when the source does not carry a recognized MIME type or filename.

const file = new File([docxBytes], "document.docx");
const result = await new MarkItDown().convert(file);

URLs

HTTP and HTTPS URLs are fetched with the global fetch. Pass a custom implementation when needed.

const result = await new MarkItDown().convert("https://example.com/article.html");

Browser requests remain subject to the remote server's CORS policy.

Responses

const response = await fetch("https://example.com/feed.xml");
const result = await new MarkItDown().convert(response);

API

type ByteSource = Uint8Array | ArrayBufferLike | ArrayBufferView | Blob;
type ConversionSource = ByteSource | Response | URL | string;

class MarkItDown {
  convert(source: ConversionSource, options?: ConverterOptions): Promise<ConverterResult>;

  /** @deprecated Pass the source directly to convert(). */
  convertBuffer(
    source: ByteSource,
    options: ConverterOptions & { file_extension: string }
  ): Promise<ConverterResult>;
}

convertBuffer remains as a compatibility alias, but convert(bytes, options) is preferred.

Development

pnpm install
pnpm check
pnpm test --run
pnpm build

Biome handles both formatting and linting. tsup produces ESM, CommonJS, source maps, and declarations in dist.

License

MIT License © 2026 Ryan Garber
MIT License © 2024 Vaibhav Raj