I am looking for a C++ syntax highlighter, i.e. an application that takes plain text input (C++ code, of course) and provides formatted code as output (HTML, RTF).

Why do I need that? Yes, any IDE will do the syntax highlighting. However, I sometimes need code in Word documents or Powerpoint presentations. And I want syntax highlighting there as well.

I can't use online code tools (https://godbolt.com would do that nicely) due to company policies. I am not allowed to post code there.


  • works on Windows
  • works offline, no Internet
  • is gratis, Open Source preferred

Basically such a tool needs a minimal UI. A single textbox would be enough. I paste the Code from clipboard and I copy it back to the clipboard. That's it. No export functionality, no opening of files, nothing else needed.

  • 1
    not exactly your requirement so not posting this as an answer, but for the purpose of "code on slides for a presentation" I use sli.dev sli.dev
    – julaine
    Commented Feb 26 at 15:47
  • @julaine: thank you. Certainly interesting. Commented Feb 27 at 7:14

1 Answer 1



You can simply copy your code and the highlighting will be copied, too. See screenshot where I've copied from VSCodium and pasted it to LibreOffice.

VSCodium is

  • open source
  • works offline
  • works on Windows

enter image description here

Note: that I skipped your request for exporting to HTML as it seems to me you would be fine with copy+paste, e.g. copy the code and paste it into your Word or PowerPoint documents, right?

  • 1
    Sure, I think the clipboard will contain either HTML or RTF. Commented Feb 26 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.