Advertisement
Half-Life 2

Cheats & codes

Half-Life 2 Cheat Codes

Grouped by type and platform, each one labelled reported working or tested.

There are 72 cheat codes for Half-Life 2 across PC (Microsoft Windows). Each code below lists the exact button combination or console command, what it does, and whether using it disables achievements.

Verified
Sponsored

Console commands

72

Adjust Viewmodel Size

Adjusts the size of the carried weapon model (default 54)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Change Gravity

Sets world gravity to the chosen value, default is 600

Open the console with the tilde key and type the command with a number

PC Reported working
Did this work for you?

Lower values make jumping floaty

Change Level Keeping Inventory

Changes to the named level while carrying your current inventory, e.g. changelevel d1_trainstation_01

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Change world gravity

Sets world gravity; default is 600, lower values let you jump huge distances

Type sv_gravity 300 in the console and press Enter, replacing 300 with any value

PC Reported working
Did this work for you?

Extreme values can break physics or crash the game

Damage Player

Damages the player by the chosen amount

Open the console with the tilde key and type the command with a number

PC Reported working
Did this work for you?

Useful for testing death states

Damage yourself

Damages the player by the given amount

Type hurtme 10 in the console and press Enter, replacing 10 with any number

PC Reported working
Did this work for you?

None

Display Crosshair

Displays the crosshair

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Draw Trigger Volumes

Draws game trigger volumes

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Enable cheats first

Turns on cheat mode so the other console commands work

Press the tilde key to open the console, type the command, then press Enter. Enter this before the other commands

PC Reported working
Did this work for you?

Enabling cheats blocks achievements in that session. Save before use

Enable Mouse Look

Enables mouse look

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Equip Spawned NPCs

Equips subsequently spawned NPCs with the named weapon, e.g. npc_create_equipment weapon_smg1

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Execute Console Script

Executes a console script file

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Freeze NPC AI

Freezes all NPC AI. Enter again to turn off

Enable the developer console in options, press tilde, type the command, press Enter. Enter sv_cheats 1 first

PC Reported working
Did this work for you?

Cheats require sv_cheats 1 and can disable achievements. Save first.

Give .357 Magnum

Spawns the .357 Magnum for you.

Open the console (~) and type the command.

PC Reported working
Did this work for you?

Requires sv_cheats 1 first. Replace with other weapon_ IDs for other guns.

Give 9mm Pistol

Hands you the 9mm Pistol

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Alyx's Pistol

Hands you Alyx Vance's custom pistol

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Bugbait

Hands you the Bugbait (antlion pheromone pods)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Combine Stun Baton

Hands you the Combine Stun Baton

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Crossbow

Hands you the Crossbow

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Fragmentation Grenade

Hands you a Fragmentation Grenade

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Grigori's Shotgun

Hands you Father Grigori's modified shotgun

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Health Vial

Spawns a small (10 HP) health vial

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give HEV Suit

Grants the HEV suit

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Large Health Kit

Spawns a large (25 HP) health kit

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give MP7 Submachine Gun

Hands you the MP7 Submachine Gun

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Overwatch Pulse Rifle

Hands you the Overwatch Pulse Rifle

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give RPG Launcher

Hands you the RPG launcher

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Shotgun

Hands you the 12-gauge Shotgun

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Give Weapon or Item

Spawns the named weapon/item entity, e.g. give weapon_physcannon

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Grunt-O-Matic

"Grunt-O-Matic" listed by cheat references (an old impulse test function)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Holster Weapon

Holsters your current weapon, removing the weapon model from view

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Infinite ammunition

Weapons never run out and never need reloading.

Requires sv_cheats 1 first.

PC Reported working
Did this work for you? 0 of 1 reader says it worked

Jump to a chapter

Loads any map by name.

Requires sv_cheats 1 first.

PC Reported working
Did this work for you?

Kill All NPCs

Kills all NPCs in the area.

Open the console (~) and type the command.

PC Reported working
Did this work for you?

Requires sv_cheats 1 first. May break scripted events.

List Available Maps

Lists the available maps in the console

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Load any map

Loads the named map directly

Type map followed by a map name from the maps list and press Enter

PC Reported working
Did this work for you?

Skipping maps can skip story triggers

Moon Gravity

Lowers world gravity (default is 600).

Open the console (~) and type the command.

PC Reported working
Did this work for you?

Requires sv_cheats 1 first. Reset with sv_gravity 600.

Refill Held Weapon Ammo

Refills ammo for the held weapon to maximum

Enable the developer console in options, press tilde, type the command, press Enter. Enter sv_cheats 1 first

PC Reported working
Did this work for you?

Cheats require sv_cheats 1 and can disable achievements. Save first.

Set Gravity

Sets the gravity value (default 600; lower values float you upward)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Set View Angle

Sets the player's view angle

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Show FPS counter

Displays the frames-per-second counter on screen

Type cl_showfps 1 in the console and press Enter

PC Reported working
Did this work for you?

Type cl_showfps 0 to hide it

Skulls Effect

"Skulls" effect listed by cheat references (an old impulse test function)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Slow motion

Slows the whole game. Use 1 to return to normal speed.

Requires sv_cheats 1 first.

PC Reported working
Did this work for you?

Spawn a crowbar

Places the named weapon in your inventory.

Requires sv_cheats 1 first.

PC Reported working
Did this work for you?

Spawn Airboat

Spawns a drivable airboat

Open the console with tilde, type the command, press Enter

PC Reported working
Did this work for you?

Requires sv_cheats 1 first. Save before use.

Spawn Airboat (Command)

Spawns the Airboat vehicle

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn Alyx Vance

Spawns Alyx Vance

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn any item or weapon

Gives the named weapon, item or ammo to the player

Type give followed by an item name and press Enter, e.g. item_ammo_357 for .357 ammo or weapon_smg1 for the SMG

PC Reported working
Did this work for you?

None

Spawn Combine Soldier

Spawns an Overwatch Combine soldier

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn Headcrab Zombie

Spawns a headcrab zombie

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn NPC by Name

Spawns the named NPC entity, e.g. npc_create npc_alyx

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn NPC Facing Away

Spawns an NPC facing away from the player

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn Scout Car (Command)

Spawns the scout car (Jeep) vehicle

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn Scout Jeep

Spawns the Jeep (the buggy scout car) at your position

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Spawn Strider

Spawns a Strider at your location

Press the tilde key to open the console, type npc_create npc_strider and press Enter. Use noclip to rise to its height

PC Reported working
Did this work for you?

Spawning NPCs can break scripted sequences. Save first.

Spawn the gravity gun

Gives the zero-point energy field manipulator.

Requires sv_cheats 1 first.

PC Reported working
Did this work for you?

Suicide

Kills the player character immediately

Enable the developer console in options, press tilde, type the command, press Enter. Enter sv_cheats 1 first

PC Reported working
Did this work for you?

This kills the player on purpose. Save first.

Suit Battery

Adds 15 suit energy

Press the tilde key to open the console, type give item_battery and press Enter

PC Reported working
Did this work for you?

Needs sv_cheats 1 first. Save first.

Super Gravity Gun

Turns the gravity gun into the supercharged blue version from the Citadel that can pick up enemies and hurl heavy objects

Press the tilde key to open the console, type physcannon_mega_enabled 1 and press Enter

PC Reported working
Did this work for you?

Type physcannon_mega_enabled 0 to turn it off again. Enemy weapons vaporize when they die while this is on.

Supercharge Gravity Gun

Upgrades the Gravity Gun to its supercharged (blue) Citadel state

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Switch Camera View

Switches between third-person and first-person camera views

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Take damage but never die

You still take damage but your health cannot drop to zero

Type buddha in the console and press Enter

PC Reported working
Did this work for you?

Re-enter buddha to toggle it off

Teleport to Coordinates

Teleports the player to the given coordinates

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Toggle Developer Messages

Toggles developer messages in the console (2 is verbose)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Toggle Entity Picker

Toggles the entity picker/debug mode

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Toggle HUD

Shows or hides the HUD

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Toggle HUD (Alternate)

Shows or hides the HUD (alternate command)

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

Unlimited HEV Suit Aux Power

Gives unlimited HEV suit auxiliary power (sprint, flashlight, oxygen); sources disagree on the exact command name

Enable the console in options, press ~, type sv_cheats 1 first

PC Reported working
Did this work for you?

sv_cheats 1 disables achievements

God Mode

You cannot take damage

Press the tilde key to open the console, type god and press Enter. Type it again to turn it off

PC Reported working
Did this work for you?

Needs sv_cheats 1 first. Save first.

No clipping

Fly through walls and geometry.

Requires sv_cheats 1 first. Type it again to turn it off.

PC Reported working
Did this work for you?

All Weapons and Ammo

Gives you all weapons in the game with a full supply of ammunition

Enable cheats first with sv_cheats 1, then type the code in the console and press Enter

PC Reported working
Did this work for you?

Single player only, also refills suit power

Ignore enemies

Enemies stop noticing you.

Requires sv_cheats 1 first.

PC Reported working
Did this work for you?
A code stopped working after a patch? Tell us and we will retest it. Know one we are missing? Submit it here. What the tested badge means, and which codes carry it.

Tools for Half-Life 2 cheats

Buy Half-Life 2 on Amazon

Opens Amazon search results; check the edition and platform before buying. As an Amazon Associate I earn from qualifying purchases.

Quick answers

About Half-Life 2 cheats

How many cheats does Half-Life 2 have?
This page lists 72 for Half-Life 2, all of them console commands.
How do you enter cheats in Half-Life 2?
Enable the console in options, press ~, type sv_cheats 1 first. A few codes use a different method, shown beside each one.
Do cheats disable achievements in Half-Life 2?
47 of the 72 codes here carry a warning about achievements or trophies. The note reads: "sv_cheats 1 disables achievements."
Which platforms are these Half-Life 2 cheats for?
The codes on this page are listed for PC (72 codes). Where the game came out on other systems, the codes may differ there.
Are these Half-Life 2 cheats still working?
All 72 are marked "Reported working": each comes from a documented source, and none has been run by us yet. A code we test gets a dated "Tested" badge.
Advertisement