codeshot.io
Regex · Flags · PNG + SVG

Make your regex presentable.

Paste a pattern, set its flags, and Codeshot renders it cleanly with highlighting — perfect for teaching, documentation and the inevitable regex thread.

Input:
Source code
Output:
PNG, SVG, clipboard
Cost:
Free
Account:
Not required
Processing:
In your browser
pattern.re
/gi

Click the content to edit it directly. Adjust the controls, then export.

What is the Regex generator?

A regex image tool renders a regular expression with highlighting and a flags badge, so a dense pattern becomes explainable. Share the exact expression — flags and all — in documentation, a lesson or the inevitable “what does this match?” thread.

Codeshot is free and runs entirely in your browser — no account, no watermark, and nothing you paste is uploaded. Export a retina PNG or a scalable SVG, or copy the image straight to your clipboard.

When to use it

  • Teaching and cheat sheets
  • Documentation and code comments
  • Pattern-explainer threads
  • Code reviews

Why use Codeshot for regex image?

Pattern highlighting

Groups, classes and anchors are colored so the pattern is easier to read.

Flags, front and center

Set g, i, m, s and more so the full expression is unambiguous.

Teaching-ready

Clean images that make a gnarly pattern explainable.

How to turn a regex into an image

  1. 01

    Paste the pattern

    Drop in your regular expression.

  2. 02

    Set flags & frame

    Choose flags, a theme, backdrop and font.

  3. 03

    Export & share

    Save a PNG or SVG, or copy to clipboard.

Regex — frequently asked questions

Can I set regex flags?+

Yes — use the Flags control to add g, i, m, s, u or y so the expression is shown exactly as it runs.

Are named groups supported?+

Paste any valid pattern, including named capture groups and lookarounds; Codeshot renders it verbatim.

What can I export, and is it free?+

Export a high-resolution PNG or a scalable SVG, or copy straight to your clipboard. Codeshot is completely free — no account, no watermark, no limits.

Do I need an account or any software to install?+

No. Codeshot runs entirely in your web browser — there is nothing to download or install, and no sign-up, login or email is required. Open the page, paste your content and export.

Can I use the exported images commercially?+

Yes. You keep all rights to the content you paste and the images you create, and you can use them in commercial blog posts, courses, slides, documentation and social media at no cost. There is no watermark on any export.

Can I customize the theme, font, background and size?+

Yes. Choose from a dozen real editor themes (Dracula, Night Owl, One Dark, GitHub and more), premium self-hosted fonts, gradient, solid or transparent backdrops, light or dark window modes, and adjustable padding, font size, shadow and window controls.

Does Codeshot work on mobile and in every major browser?+

Codeshot works in modern browsers on desktop and mobile, including Chrome, Firefox, Safari and Edge. A larger screen makes fine-tuning the frame easier, but you can create and export an image from a phone or tablet too.

Explore all 17 Codeshot tools

One studio, 17 focused generators — each with its own controls, content and look.