"category": "utility",

JSON to Image - Beautiful Code Screenshots

"tldr": Paste JSON and download a beautiful syntax-highlighted PNG - three themes, 2x resolution, perfect for docs, slides, and social posts.

Turn a JSON snippet into a polished, syntax-highlighted image - the kind of screenshot you see in engineering blog posts, conference slides, and social threads. Pick a theme, paste your JSON, and export a crisp 2x-resolution PNG or copy it straight to the clipboard.

{"export": "png"}
{
  "name": "JSON Console",
  "purpose": "beautiful JSON screenshots",
  "themes": [
    "midnight",
    "paper",
    "ocean"
  ],
  "free": true,
  "watermark": "jsonconsole.com"
}
jsonconsole.com

Screenshots of raw editor windows carry noise: line numbers, UI chrome, inconsistent fonts. A rendered card with clean highlighting and padding reads better everywhere - README files, API docs, incident writeups, and course material. Your JSON is validated and pretty-printed first, so the image never ships a syntax error.

How to create a JSON image

  1. 1Paste your JSON - it is validated and pretty-printed automatically.
  2. 2Pick a theme (Midnight, Paper, or Ocean); the preview updates live.
  3. 3Click Download PNG for a 2x-resolution file, or Copy image to paste directly into Slack, docs, or a tweet.
  4. 4Rendering happens in your browser - the JSON never leaves your machine.

Convert JSON to PNG image in code

The same technique in your own code
import { toPng } from "html-to-image"; // npm install html-to-image

const node = document.getElementById("styled-json-card");
const dataUrl = await toPng(node, { pixelRatio: 2 });
// download or upload dataUrl
Copy an image to the clipboard
const blob = await (await fetch(dataUrl)).blob();
await navigator.clipboard.write([
  new ClipboardItem({ "image/png": blob }),
]);

Frequently asked questions

What resolution is the exported image?

The PNG is rendered at 2x pixel density, so it stays sharp on retina displays and when scaled in slides or social cards. The dimensions adapt to your snippet - longer JSON produces a taller image.

Why use an image instead of a code block?

Code blocks are better wherever they are supported - they are selectable and accessible. Images win where markdown is not rendered or styling is out of your control: social posts, slide decks, PDFs, email, and chat apps. For accessibility, include the raw JSON as alt text or a caption when you can.

Can I customize the theme or remove the watermark?

Three curated themes are built in, and the small jsonconsole.com watermark stays on - it is how free tools like this one get discovered. If you need fully custom branding, the underlying approach (render HTML, export with html-to-image) is easy to reproduce in your own code.

Is there a size limit?

Practical, not hard: very long documents produce very tall images that most platforms downscale into unreadability. For anything over ~40 lines, screenshot the interesting part - or link to the full document with a share link from any of our converter tools.

Last updated:

You might also need

Free and in-browser, like everything on JSON Console. Browse all tools →