Cheats & CodesValheim

Valheim Console Commands: devcommands, God Mode, Spawn and More

Valheim 2
Valheim

Short answer: On PC, add -console to Valheim’s launch options in Steam (or tick Enable Console in the gameplay settings), load a world and press F5. Type devcommands to turn cheats on; since 1.0 the game asks you to confirm with confirmcheats. Then god makes you invulnerable, fly lets you fly, spawn [item] [amount] spawns items and exploremap reveals the map. Cheats work in single player or as the host only.

How to turn on the console

  1. Steam: right-click Valheim in your library, choose Properties and type -console under Launch Options.
  2. PC Game Pass / Microsoft Store: make a shortcut to Valheim.exe and add -console to the end of the Target field.
  3. In game (recent versions): press Esc, open Settings, then Gameplay, and tick Enable Console.
  4. Load your world and press F5 to open the console. Type devcommands and press Enter; confirm with confirmcheats if asked. Type devcommands again to turn cheats off.

Xbox: the console exists there too: hold LB+RB+LT+RT, press Menu, then A to bring up the keyboard. The console is also available on PS5. On dedicated servers, cheats are blocked unless the server is modded.

Achievements: sources disagree on whether cheats block them. Since 1.0, some guides say using a cheat after confirmcheats stops achievement progress for that character and world. Use a separate character and world if achievements matter to you.

Commands that work without cheats

CommandWhat it does
helpLists the commands.
saveSaves the world straight away.
pingShows your latency to the server.
lodbias [1-5]Sets the draw distance.
infoShows system information.
kick [name/IP/userID]Kicks a player from your server.
ban [name/IP/userID]Bans a player.
unban [IP/userID]Lifts a ban.
bannedLists banned players.
nomapTurns the map on or off for the world.
noportalsTurns portal use on or off.
Valheim 1
Valheim

Character cheats

CommandWhat it does
godGod mode: you take no damage. Type it again to turn it off.
ghostEnemies ignore you.
healFills your health.
pukeClears your food and resets health and stamina.
raiseskill [skill] [amount]Raises a skill, for example raiseskill swords 100.
resetskill [skill]Sets a skill back to 0.
resetcharacterResets your character.
model 0Switches to body type 1; model 1 switches to body type 2.
clearstatusRemoves status effects.
dpsdebugShows a damage-per-second readout.

Flying, building and debug mode

CommandWhat it does
flyTurns flying on or off.
freeflyDetaches the camera for free flight.
ffsmooth 1Smooths the free camera; ffsmooth 0 turns smoothing off.
nocostBuild and craft without materials.
debugmodeTurns on debug mode and its keys (below).
Key (in debugmode)What it does
ZTurns flying on or off. Space flies up, Ctrl flies down.
BFree building: no workbench and no materials needed.
KKills enemies near you.
LRemoves items lying on the ground near you.
Ctrl+F3Hides the HUD.

Items and creatures

CommandWhat it does
spawn [item] [amount] [level]Spawns an item or creature next to you (not in your inventory). Item names are case-sensitive.
tameTames creatures around you.
killallKills creatures around you, tamed ones included.
killenemiesKills hostile creatures only.
killtameKills tamed creatures only.
removedropsRemoves dropped items near you.
removebirdsRemoves birds near you.
removefishRemoves fish near you.

Map and teleporting

CommandWhat it does
exploremapReveals the whole map.
resetmapHides the map again.
posShows your coordinates.
goto [x,z]Teleports you to the coordinates. Some guides write it as goto [x] [z].
recall [player]Teleports another player to you.

Time, weather and raids

CommandWhat it does
tod [0-1]Sets the time of day: 0.5 is midday, 0 or 1 is midnight. tod -1 brings the normal day cycle back.
skiptime [seconds]Moves time forward.
sleepSkips ahead one day.
timescale [multiplier]Speeds up or slows down time (up to 3).
wind [angle] [intensity]Sets the wind. Angle 0 is north; intensity is 0 to 1.
resetwindPuts the wind back to normal.
env [weather]Forces a weather type, for example env Rain.
resetenvPuts the weather back to normal.
event [name]Starts a raid event.
stopeventStops the current event.
randomeventStarts a random event.
players [n]Scales difficulty as if n players were nearby; 0 resets it.

World keys

CommandWhat it does
listkeysLists the world’s global keys (boss and progress flags).
setkey [key]Adds a global key.
removekey [key]Removes a global key.
resetkeysRemoves all global keys.

Commands that changed or no longer work

Old commandStatus
imacheaterRenamed to devcommands in patch 0.148.6 (March 2021).
removeallFound only in old lists. Not in current versions.
optterrainOnly converts terrain made before patch 0.150.3. Not needed for new worlds.

More Valheim guides

Everything we have on the game is on the Valheim page. For another survival sandbox, see our Starbound admin commands.

Sources

  • PC Gamer: Valheim cheats and console commands
  • GamesRadar+: Valheim cheats
  • KeenGamer: Valheim 1.0 console commands and cheat codes
  • All Things How: how to enable console commands in Valheim
  • Gamesfuze: Valheim 1.0 console commands
  • Destructoid: Valheim console commands
  • commands.gg: Valheim commands
  • International Business Times: Valheim update, how to enable console commands

Last checked against sources: 14 November 2026.

Found a mistake or a step that no longer works? Tell us and we will check it.