Home / Images / Code to image
Code to image
Paste code, pick a language (JavaScript, Java, Python, Go, Rust, Vue and 15 more) and a theme (20 light / dark themes), set font size, padding, window style (macOS / Windows / Linux) and line numbers, preview live and export PNG or JPEG.
Free and no sign-up. Code to image computes and renders entirely in your browser; nothing you enter is uploaded.
More tools in Images
- Image compressor — Upload an image and re-encode it to the target format, quality and maximum edge length; before / after size and dimensions are compared live and nothing is downloaded until you confirm.
- Image cropper — Upload an image and drag out the crop area — rectangle, rounded rectangle or circle (ellipse) — optionally locking common ratios such as 1:1, 4:3 and 16:9. The crop is previewed live and can be exported as PNG / JPEG / WebP with transparency.
- Collage maker — Set your own canvas size with a transparent, solid or image background; add text (font size, colour and typeface — 20+ free-for-commercial-use Chinese fonts including 7 brush-script faces, or your own uploaded font), your own images and built-in stickers, then drag, scale, flip and rotate them before exporting PNG / JPEG / WebP.
- Image to Base64 — Convert an image to a Data URL or plain Base64 text, or turn Base64 back into an image — with copy and download.
- Favicon generator — Upload a logo to get a full set of 16–512 px PNG icons plus a favicon.ico with 16 / 32 / 48 px inside. Background colour and margin are adjustable, everything downloads as a bundle, with the HTML tags ready to copy.
- AI watermark remover — Upload an image and select the watermark by hand, pay per run; processing starts automatically once the Alipay payment succeeds, only the selected area is repainted, and the result can be downloaded right away.
- AI image generator — Write a prompt, pick an aspect ratio (1:1, 4:3, 16:9, 9:16 and four more) and a resolution (2K ¥2, 4K ¥3); once the Alipay payment succeeds, AI renders a new image you can download straight away. Failed runs are refunded automatically.
- AI background remover — Upload an image and let AI cut out the subject and remove the background, pay per run (¥1 each time); optionally add a one-line background description (e.g. “a white studio backdrop”) to help it tell the subject apart, output with a transparent background (PNG) or in the original format / JPEG, with the result matching the original size. Failed runs are refunded automatically.
- AI upscaler — Upload an image, choose a resolution (2K ¥2, 4K ¥3) and a scene (portrait, landscape, architecture and 53 more, or leave it on the default prompt); after payment succeeds AI repaints it sharper at the original aspect ratio and you can download the result. Failed runs are refunded automatically.
- Image to ASCII art — Turn an image into ASCII art: black & white maps brightness to character density while colour keeps per-character pixel colours. Charset (10 / 70 levels), columns, character size, brightness, contrast and invert are adjustable, with text copy and TXT / PNG / SVG / HTML export. Everything runs locally in the browser; the image never leaves your device.
Frequently asked questions about Code to image
- Is my code uploaded to a server?
- No. Highlighting, layout and export all run locally in the browser, and your code is never sent to any endpoint; the layout modules some languages use for "Format" (including the gofmt / clang-format wasm files) are downloaded from our site on first use, but only the modules themselves are transferred, never your code.
- Which languages, themes and export formats are supported?
- It supports 20 languages (JavaScript, TypeScript, Java, C, C++, Go, Rust, Python, Vue, HTML, CSS, SQL, Bash, JSON, XML, YAML, PHP, Ruby, Kotlin, Swift) and 20 light / dark themes, with adjustable font size, padding, line numbers and window style (macOS / Windows / Linux); export is PNG or JPEG.
- Will processing overwrite the original file?
- No. The original stays read-only and the result is saved as a new download you can review before replacing anything; the original file is never touched.
- Which image formats are supported?
- Input accepts any common format the browser can decode (JPEG, PNG, WebP, GIF, BMP and more); export supports JPEG, WebP and PNG, and each tool offers whichever of those its page lists (code-to-image exports PNG or JPEG, image-to-ASCII exports TXT / PNG / SVG / HTML).
- Are images uploaded to a server?
- Not for anything except AI watermark removal, AI background removal, AI image generation and AI upscaling. Compression, cropping, collage, image-to-Base64, code-to-image and image-to-ASCII all run locally in the browser, so images never leave your device; the four AI tools need model inference, so the content (the image or the description) is submitted to our backend only after payment succeeds, and the result image is sent straight back to the browser. The source image used by AI image generation and AI upscaling is also uploaded to our site, only so the model can fetch it; the page never shows or hands out an image link, and the result image is still never written to disk.
- Do I need to register or pay to use Code to image?
- Almost every tool is free, needs no registration or sign-in and has no usage limit; the few pay-per-use features (such as AI watermark removal, AI image generation, AI upscaling, AI annotation, and AI flowchart, mind-map and Mermaid generation) state their prices on the page.
- Is the data I process with Code to image uploaded to a server?
- No. Calculation and rendering run locally in the browser and your input is never sent to a server; only the IP address page asks our backend for your outbound address when it opens, and that request carries none of your input. Features that need the backend (such as AI watermark removal, AI image generation, AI upscaling, AI annotation, AI flowchart and mind-map generation and "Financial statements – Small Business Accounting Standards") state their upload scope on their own pages.
About Local Toolbox
Local Toolbox gathers the small tools you reach for every day into one place: formatters, encoding converters, date maths, ID card and address parsing, image and QR code handling, password and amount conversion. Open a page and start working — no sign-up, and almost every tool has no usage limit.
Most features compute inside your browser, so your input never leaves your device; the pages are plain static assets, load fast and keep working offline. The IP page asks our backend for your outbound address when it opens and sends none of your input. AI watermark removal, AI background removal, AI image generation and AI upscaling send content to our backend for inference (watermark removal is ¥1 per run; background removal is ¥1 per run; image generation and upscaling are priced by resolution — 2K ¥2, 4K ¥3); AI annotation sends images to a large model that locates the target and returns coordinates (¥0.5 per image, refunded only when every image in the batch fails); AI flowchart, AI mind-map and AI Mermaid chart generation send your text description to a model that builds the diagram (three separate products, charged ¥0.5, ¥0.5 and ¥0.5 per run respectively); and the accounting helper sends the income, expense, social-insurance and balance figures you fill in to generate a report (¥0.5 for the spoken analysis, ¥1 for the report). These features accept Alipay only, upload nothing before payment succeeds, and refund automatically if processing fails.
- Local first: Parsing, conversion, encoding and image processing all happen in your browser and nothing you type is uploaded (AI watermark removal and AI background removal need the image, AI image generation and upscaling need one upload to obtain a URL, AI annotation needs the images for the model, AI résumé rewriting needs your résumé text, AI flowchart and mind-map generation need your text description, and the accounting helper needs the figures you submit).
- Pay per use, prices in plain sight: Almost every tool is free, needs no account and has no usage limit. Only AI watermark removal (¥1 per run), AI background removal (¥1 per run), AI image generation and AI upscaling (2K ¥2, 4K ¥3), AI annotation (¥0.5 per image), AI résumé rewriting (¥0.5 per run), AI flowchart, mind-map and Mermaid chart generation (¥0.5, ¥0.5 and ¥0.5 per run) and the accounting helper (¥0.5 for the spoken analysis, ¥1 for the report) are charged per use. Payment is Alipay only, nothing is uploaded before you pay, and failed runs are refunded automatically.
- One link per tool: Every tool has its own link, so bookmarks and shared URLs always land on the same page.
Links