Code Highlighter
Highlight code snippets in multiple languages with customizable themes, wrap mode, and line numbers.
Source Code
app.jsPreview
JavaScriptHighlight code with themes, line numbers, wrapping and adjustable preview font sizes. Copy formatted code into Word or export a JPG for documentation and slides.
Format code for documents and presentations
Paste JavaScript, TypeScript, Python, Java, HTML, CSS, JSON or another supported language and select its syntax. Choose a colour theme, toggle line numbers and wrapping, and select a preview font size from 10 to 32 px.
Font size changes apply to the highlighted preview, rich-text copy and image export. The source editor keeps its own text size. Supported languages also offer a separate formatting action to organise indentation; changing colours or display size does not rewrite your code.
How to paste highlighted code into Word
- Paste your code and select the correct language.
- Adjust the theme, font size, line numbers and wrapping.
- Click Copy Code and paste into your Word document.
- Choose Keep Source Formatting in Word to retain the supplied colours and layout.
The clipboard includes rich-text formatting. An application that accepts only plain text will discard syntax colours; use an image when a fixed appearance matters.
Save a code screenshot
Download the preview as a JPG for slides, tutorials, blog posts or messages. Images preserve the visual presentation, while rich text or the original source is more useful when the code needs to remain editable.
Frequently asked questions
Are highlighting and formatting the same?
Highlighting colours syntax elements. Formatting changes code layout. Some languages support highlighting only; the page indicates when its formatter is unavailable.
Why did the colours disappear when I pasted?
Plain-text paste removes formatting. Use normal paste or Word's Keep Source Formatting option, and allow the browser to copy content.
Does this run or validate my code?
This tool presents code; it does not execute it. Use the JSON validator and formatter to check JSON, or the Markdown previewer when preparing a technical article.