JavaScript

JavaScript Code Screenshot Generator

Turn JavaScript snippets into images worth sharing, without leaving your Mac.

JavaScript snippets travel further than most, partly because so much of the audience can read them without context.

Codeshot detects JavaScript from the code you paste, so there is no language picker to get wrong. Here is the same snippet in three of the 30 themes it ships with, rendered with the app's own stylesheets.

export async function share(snippet) {
  const image = await render(snippet, {
    theme: "atom-one",
    padding: 20,
  });

  return upload(image, { format: "png" });
}
Atom One · dark
export async function share(snippet) {
  const image = await render(snippet, {
    theme: "atom-one",
    padding: 20,
  });

  return upload(image, { format: "png" });
}
GitHub · dark
export async function share(snippet) {
  const image = await render(snippet, {
    theme: "atom-one",
    padding: 20,
  });

  return upload(image, { format: "png" });
}
Panda Syntax · dark

Choosing a theme for JavaScript

Async code benefits from a wider ratio. If your lines run long because of promise chains, 16:9 keeps them on one line, which matters more than the whitespace it costs you.

Getting the size right

Let the image follow your content, or lock it to a ratio — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, or 3:4 — then export at 1×, 2×, or 3× so it stays sharp on a retina display. Copy it straight to the clipboard with C, or save with S.

See all 30 themes side by side, or read the full workflow.

Built for JavaScript, and 59 other languages

Everything runs on your Mac. Your code never leaves it.

Download for macOS