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

postman-collection-to-html

v1.3.0

Published

Postman collection to HTML converter

Readme

Postman Collection to HTML Converter

A Node.js tool that converts Postman collection v2.1 into HTML document.

https://www.npmjs.com/package/postman-collection-to-html

Features

  • Convert Postman collection JSON files into HTML document
  • Multi-language support (English and French)
  • Custom logo embedding

Installation

npm install -g postman-collection-to-html

Usage

Basic Usage

npx postman-collection-to-html my-collection.json

Advanced Usage

# Specify output file
npx postman-collection-to-html my-collection.json --output=my-docs.html

# Specify language
npx postman-collection-to-html my-collection.json --lang=fr

# Include a logo
npx postman-collection-to-html my-collection.json --logo=path/to/logo.svg

# Add border-bottom to h1 headings
npx postman-collection-to-html my-collection.json --divider=h1

# All options together
npx postman-collection-to-html my-collection.json --output=docs.html --lang=fr --logo=assets/logo.svg --divider=h1

Command Line Options

  • <input-file.json>: Path to your Postman collection JSON file (required)
  • --output=filename.html: Output HTML file name (optional, defaults to "api-doc.html")
  • --lang=language: Language for the documentation (optional, defaults to "en")
  • --logo=logo.svg: Path to SVG logo file to embed (optional)
  • --divider=h1|h2|h3|h4|h5|h6: Heading level to add border-bottom styling (optional)

Supported Languages

  • English (en) - Default
  • French (fr)

Programmatic Usage

import { collectionToHTML } from "postman-collection-to-html";
import fs from "fs";

// Generate English documentation (default)
collectionToHTML("collection.json");

// Generate with custom options
collectionToHTML("collection.json", {
  outputFile: "my-api-docs.html",
  language: "fr",
  divider: "h2",
});

// Generate documentation with a logo
const logo = fs.readFileSync("logo.svg", "utf8");
collectionToHTML("collection.json", {
  outputFile: "output.html",
  language: "en",
  logo: logo,
});

Options

  • outputFile (string, optional): Output HTML file name (defaults to "api-doc.html")
  • language (string, optional): Language for the documentation (defaults to "en")
  • logo (string, optional): SVG content to embed as logo (defaults to null)
  • divider (string, optional): Heading level (h1-h6) to add border-bottom styling

Logo Support

You can include a logo in the documentation header by passing SVG content as parameter to the collectionToHTML function. The logo content is embedded directly into the HTML, making the generated documentation completely self-contained.

Adding a Logo (Programmatic)

import { collectionToHTML } from "postman-collection-to-html";
import fs from "fs";

// Read SVG logo content
const logo = fs.readFileSync("path/to/your/logo.svg", "utf8");

// Generate documentation with logo
collectionToHTML("collection.json", {
  outputFile: "output.html",
  language: "en",
  logo: logo,
});

Adding a Logo (Command Line)

# Specify logo file explicitly
npx postman-collection-to-html my-collection.json --logo=path/to/logo.svg

For command-line usage, use the --logo flag to specify the path to your SVG logo file.

Logo Requirements

  • Format: SVG format (required for inline embedding)
  • Size: The logo will be automatically resized to:
    • Desktop: 80px height, max 350px width
    • Mobile: 60px height (responsive)
  • Self-contained: The SVG content is embedded directly into the HTML, so no external files are needed

Without Logo

If no logo is provided, the documentation will be generated without a logo, and the header will only contain the collection name and generation date.