Hostile mobs in Minecraft spawn at least 24 blocks away from you and up to about 128 blocks away , depending on edition and settings.

Basic spawn distances

For normal hostile mob spawning around a player:

  • They do not spawn within 24 blocks of you (a “no‑spawn bubble”).
  • They can spawn from 24 blocks out to roughly 128 blocks away on Java Edition.
  • On Bedrock Edition, the maximum distance depends on your simulation distance (usually somewhere between about 44 and 128 blocks).

So if you’re asking “how far away do you have to be for mobs to spawn?”, the practical answer most players use is:

Be more than 24 blocks away , but within about 128 blocks of the spawnable area.

Java vs Bedrock at a glance

[7][1] [1][7] [3][7][1] [7][1] [3][1][7] [1][7]
Mechanic Java Edition Bedrock Edition
Minimum distance mobs can spawn from you 24 blocks radius (no spawns closer than this) 24 blocks radius as well
Typical maximum spawn distance 128‑block radius sphere around the player Set by simulation distance; around 44–128+ blocks
Instant despawn distance for hostile mobs >128 blocks from nearest player Outside simulation distance

Practical tips (mob farms & bases)

  • For a simple mob farm on Java, stand so the platforms are between 24 and 128 blocks away from you.
  • Try to make caves or unwanted dark areas more than 128 blocks away from your AFK spot so mobs there despawn and don’t steal your mob cap.
  • To keep your base safe, keep it well lit , and remember that mobs only appear outside that 24‑block bubble if the light and block conditions allow it.

TL;DR:
Stand at least 24 blocks away from where you want mobs to appear, and no farther than about 128 blocks (or your Bedrock simulation distance) for them to spawn consistently.

Information gathered from public forums or data available on the internet and portrayed here.