Hitboxes, hurtboxes and why they are separate
The picture of a character is not what the game checks for hits. The game checks invisible shapes. A hitbox is the part that deals damage, like the blade of a sword during a swing. A hurtbox is the part that can take damage, usually the body. A body shape is what bumps into walls and floors. Keeping them apart is what makes combat feel fair: the sword hits only on the frames where it is really out, and a raised arm does not get the character killed.
Sensors for jumping and walls
A sensor is a thin box that hits nothing and only reports what it touches. Platformers use them all the time: a feet sensor under the character says "standing on ground, a jump is allowed", front and back sensors find walls for wall slides and wall jumps, and a head sensor finds the ceiling. One button adds all four. For a stomp attack, draw a Hit box under the feet on the falling frames only. How high and how fast the jump goes is a matter of game feel, which you can tune in the Game Feel Lab.
Top-down games
Top-down characters need a different setup. The collision shape is a small box at the feet, so the character can walk close to a wall or a tree and overlap it with the head, which gives the feeling of depth. The hurtbox still covers the body. Make one animation per direction, like walk_down, walk_up and walk_side, and set which way each one faces. The interact sensor then sits in front of the character in every direction, ready for doors, chests and people to talk to. If your game turns the sprite instead, as in a top-down shooter, draw the boxes once: in Godot and Unity they turn with the sprite, and the JavaScript helper takes a rotation.
2.5D: belt scrollers and sprites in a 3D world
In a beat 'em up where characters also walk up and down the street, a punch should only land when both fighters stand in the same lane. Set a depth and every box becomes that thick from front to back. In a 2D engine the Godot script compares the lanes of the two characters before it reports a hit. For 2D sprites placed in a 3D world, the kit has a Godot script for Sprite3D and AnimatedSprite3D and a 3D mode in the Unity component, which build real 3D shapes with that thickness. Isometric games that run in a 2D engine need none of this and work as they are. For characters that are real 3D models with a skeleton, use the 3D Hitbox Editor.
How to use it
Drop a sprite sheet and set the columns and rows. Press Hurtbox from pixels, All frames, to get a body box on every frame in one click. Then go to the attack frames, pick Hit and draw a box over the weapon. Use the ghost of the last frame to keep boxes steady, copy a frame's boxes forward, and press Play to watch them move with the animation. Flip shows how the boxes look when the character faces the other way.
Shapes and points
| Shape | Good for |
|---|---|
| Box | Most hitboxes and hurtboxes. Fast to check and easy to tune. |
| Circle | Projectiles, explosions and round enemies. |
| Polygon | Angled weapons and odd shapes. Keep it convex, with no dents, for the most reliable result. |
| Point | A named spot with no size: the gun muzzle, where an effect spawns, where a hand holds an item. |
Each box can have a name and a number. Use the number for damage, knockback or anything else your game needs.
The JSON format
The file lists every frame with its place on the sheet and its boxes. Positions are in pixels, measured from the origin you picked, with y pointing down. A box has a type (hit, hurt, body, sensor or point), a shape (rect, circle, polygon or point), and the numbers for that shape: x, y, w and h for a rect from its top left corner, x, y and r for a circle from its center, and a flat list of points for a polygon. Depth is the thickness of the box for 2.5D games, or 0. Animations list the frames they use. Every field is always present, so the file also loads with Unity's JsonUtility.
Using it in an engine
Godot 4: add the script from the kit as a child of your AnimatedSprite2D. It creates Hit, Hurt and Body areas and rebuilds their shapes whenever the frame changes or the sprite flips, and it sends a signal when a hitbox touches a hurtbox. sensor_touching("feet") tells you if a sensor is on the ground. Unity: add the component next to your SpriteRenderer. It reads the frame number from the sliced sprite name and builds trigger colliders. IsSensorTouching("feet", groundMask) checks a sensor. Phaser, PixiJS and plain JavaScript: the helper gives you the shapes of a frame in world space and tells you when a hit shape overlaps a hurt shape, or when a sensor touches one of your walls or floors.
Is my sprite uploaded?
No. The sheet stays in your browser. Your boxes are saved in this browser for each image, so you can close the tab and continue later.