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.
01Command
$ chcp 6500102What 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
04Undo
$ chcp 93605Sources
- chcpEvidence: chcp sets the active console code page; 65001 selects UTF-8, 936 is the Simplified Chinese ANSI page.
- ChCP - SS64Evidence: 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
Use Windows Package Manager to install, search, and upgrade thousands of applications from the community repository in one command.
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
One command that shows OS version, install date, boot time, memory, network adapters and installed hotfixes.