Marked
A high-speed tool that takes text written in Markdown and instantly converts it into proper HTML for your website.
Marked
General JSA high-speed tool that takes text written in Markdown and instantly converts it into proper HTML for your website.
Fit
Bundle (gzip)
12.7 kB
42.5 kB raw
Install size includes transitive dependencies. Bundle size is gzipped browser payload.
Freshness
The Problem
Displaying Markdown content as rendered HTML on a web page is often a complex task that requires writing intricate parsing logic or dealing with edge cases in text formatting. For developers who want to allow users to write in a simple, human-readable format, the technical hurdle of converting that input into valid, safe, and well-structured HTML can be a significant bottleneck if they have to build the transformation engine from scratch.
What It Does
Marked solves this by serving as a high-speed, reliable compiler that handles the heavy lifting of text conversion for you. It eliminates the need for complicated custom code by providing a straightforward way to ingest Markdown and output proper HTML instantly. This allows you to integrate rich text features into your website with minimal effort, ensuring that your content remains easy to manage while the library handles all the technical nuances of rendering and performance.
Installation
npm i markedUsage Example
Import the library and call the function to parse Markdown into HTML :
import { marked } from "marked";
const html = marked.parse("# Marked in Node.js\n\nRendered by **marked**.");Related packages
Unified TypeScript SDK for building AI-powered apps — switch between 20+ LLM providers without rewriting code.
animejsGeneral JSLightweight JavaScript animation library with a tiny footprint and a powerful, expressive API.
AOSGeneral JSAn easy-to-use library that makes elements fade, slide, or zoom into view as the user scrolls down your page.
archiverGeneral JSStreaming interface for generating ZIP and TAR archives in Node.js — create compressed archives programmatically from files, directories, and buffers.
@formkit/auto-animateGeneral JS> Add smooth transitions to any element with a single line — zero-config animations for adds, removes, and moves.