Switch the Console to UTF-8 with chcp 65001

Change the cmd code page to 65001 so UTF-8 output from scripts and tools displays correctly instead of mojibake.

Windowscmddeveloperutf-8encodingLow risk
Run chcp 65001 in the console (check the current page with plain chcp) — it takes effect immediately for that window.

01Command

Command
$ chcp 65001

02What it does

The default cmd code page is a legacy ANSI page (437 US, 936 Simplified Chinese), so a program that prints UTF-8 bytes shows garbage. chcp 65001 tells the console to interpret output as UTF-8, fixing most garbled text from git, Node, Python and build tools for that session only. It can't fix files that were saved in the wrong encoding in the first place, and a few old tools behave worse under 65001 — switch back with chcp 936 (or your locale's page) if needed.

03Risk

RiskLow risk
!Warning: chcp affects only the current console session; batch files that write output with the wrong encoding will still look broken.

04Undo

Undo
$ chcp 936

05Sources

  • chcp
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: chcp sets the active console code page; 65001 selects UTF-8, 936 is the Simplified Chinese ANSI page.
  • ChCP - SS64
    SS64 · technical · 2026-09-17
    Evidence: Documents chcp 65001 for UTF-8 and lists common code pages, noting the setting is per-console-session.

Last verified: 2026-09-18 · Category: Developer

06Related solutions