System command

chcp command

Display or set the active console code page.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

chcp [<nnn>]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example usage for chcp.

chcp

Parameters, options and clauses

Option / clauseDescription
<codePage>Set the active console code page, for example 65001 for UTF-8.
No argumentDisplay the active code page.
<nnn>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
/?Display command help or the supported command-line usage.
Code pageMicrosoft documents this argument or subcommand; check the linked reference for its required format and context.
437Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
850Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
852Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
855Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
857Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
860Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
861Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
863Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
865Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
866Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
869Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
936Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory