Free · No signup · Works instantly

Paste syntax-highlighted code directly into Word

Stop screenshotting your IDE. Format any code snippet with real colours and paste it into Microsoft Word, Google Docs or any document editor — indentation and all.

Dark mode
Input
Language:
Preview
Code BG:
// Output will appear here…

How to use → Paste code, pick a language, background & border, then click Copy for Word to paste into any document, or Export .docx to download a ready-made Word file. In Word press Ctrl+V and choose Keep Source Formatting if prompted.

How it works

STEP 01

Paste your code

Drop any code snippet into the input panel. Works with any language.

STEP 02

Select language

Choose from 30+ languages or let auto-detect figure it out.

STEP 03

Pick a background

Choose dark, light, or no background. 12 presets to match your document style.

STEP 04

Copy & paste into Word

Click Copy for Word, then Ctrl+V in your document. Done.

Why FormatCode?

Microsoft Word has no built-in syntax highlighting. FormatCode solves the problem in three clicks: paste, copy, paste into Word.

  • No signup, no install, runs entirely in the browser
  • Preserves indentation exactly — critical for Python
  • Solid, opaque colours that render correctly in Word
  • Monospace font pastes with the code

Works for every use case

  • Technical documentation — paste Python, Java or SQL into Word docs
  • University assignments — submit code in Word with proper IDE colours
  • Code reviews — share snippets in review documents
  • Presentations — paste into PowerPoint slides the same way
  • Emails — formatted code in Outlook by pasting into the email body
  • Reports — embed SQL queries or config snippets cleanly

Supported languages

FormatCode supports 30+ programming languages. Click any language to load it directly into the tool.

Frequently asked questions

How do I paste code into Microsoft Word with syntax highlighting?
Use FormatCode: paste code, select language, choose a background, click Copy for Word. In Word press Ctrl+V and choose Keep Source Formatting.
Why does indentation disappear when I paste code into Word?
Word collapses regular HTML spaces. FormatCode converts every space to a Unicode non-breaking space before copying, so every indent level is preserved — critical for Python.
Does this work with Google Docs?
Yes. Click Copy for Word, then paste into Google Docs with Ctrl+V. The colours and monospace font transfer correctly.
Does FormatCode work with PowerPoint?
Yes. Click inside a text box first, then paste. The colours and font transfer correctly into PowerPoint slides.

Guides & tutorials

Copied!