TechnSols
Advertisement

Game Collision Box Editor

Edit game hitboxes online free with Game Collision Box Editor. Draw, drag and resize boxes on a sprite as JSON, no install or sign-up needed.

Be the first to rate this tool

Edit the hitboxes on the demo sprite, then press Export Hitboxes.

What Is Game Collision Box Editor?

Game Collision Box Editor is a free online tool by TechnSols that draws hitboxes on a game sprite and exports them as JSON. A hitbox is the invisible rectangle a game uses to decide when two things touch, and this tool lets you place those rectangles on top of the sprite, drag them into place, resize them by the corners, or type exact numbers. The demo sprite is already loaded, so you can start with one click and no files.

Advertisement

Every 2D game hides rectangles behind its art. The player sees a character, but the game sees a box, and when that box meets an enemy box or a wall box, the game knows a hit happened. A bad box makes the game feel wrong: hits land when the art clearly missed. This editor gives you the box itself to shape, so what the player sees and what the game measures finally agree. If your sprite needs a format change first, the live Image to JPG tool converts it in the browser before you upload it here.

Everything runs in your browser, and no file is uploaded anywhere. The sprite stays on your screen, and nothing about your game art is stored or shared.

How To Use Game Collision Box Editor?

Using Game Collision Box Editor takes about a minute, with no software to install and no account to make. The demo character is already on the canvas with one box named Body around its torso and legs. Drag that box, resize it, add more boxes, and export the JSON. The JSON Formatter tool shows the exported file in a tidy layout.

Step 1: Start With The Demo Sprite Or Upload Yours

Open the page and the demo sprite is waiting: a simple character on a 240 by 240 canvas, with a Body box at x 90, y 60, width 60, height 120. To use your own art instead, pick a PNG, JPG, or WebP file with the upload box. The file is checked by extension and magic bytes before anything is drawn, and files over 100 MB are refused. Your image is drawn to fit the same 240 by 240 canvas.

Step 2: Move, Resize, Add, And Name Each Box

Click a box to select it, then drag inside it to move it, or drag one of its four corner handles to resize it. Every box has a row in the box list with its name and four number fields for x, y, width, and height, so you can type exact values instead. Press Add Box for a new box, which starts at x 10, y 10, width 40, height 40, and press Delete on any row to remove a box. The list holds up to 20 boxes.

Step 3: Export The Hitboxes As JSON

Press Export Hitboxes and read the status line, which names the first box and its exact numbers. The file row below shows the JSON file with a 72 pixel preview, and the Download button saves it. The JSON lists the sprite size, 240 by 240, and every box with its name, x, y, width, and height, ready for your game code. The Image to WebP tool makes a WebP sprite from any image.

Why Do Hitboxes Decide How Fair A Game Feels?

Players never see a hitbox, yet they judge a game by it in every second of play. A fair game is one where a hit happens exactly when the art says it should. Tuning that box is not a small polish job at the end of a project. It is the core of how combat, jumping, and dodging feel.

The box is also the cheapest collision shape a game can use. Checking whether two rectangles overlap takes a few number comparisons, so a game can test hundreds of boxes every frame without slowing down. That is why almost every 2D game starts with rectangles. When the art itself needs a quick outline check, the SVG Editor tool previews vector art before it becomes a sprite.

A Box That Is Too Big Feels Unfair

A box that is bigger than the sprite makes the player take hits from attacks that visibly missed. The sword passes well clear of the character, yet the game records a hit. The fix is to shrink the box until its edges sit just inside the art, leaving the loose hair, the cape, and the empty air around the sprite outside the box. A slightly smaller box almost always feels fairer.

A Box That Is Too Small Feels Broken

A box that is smaller than the sprite makes attacks pass through art that was plainly struck. A punch lands on the drawing and nothing happens, so the player thinks the attack is broken. The fix is to grow the box until it covers the solid parts of the sprite, the torso, the head, and the legs, while still leaving the transparent gaps out. The goal is a box that matches the body.

One Sprite Needs More Than One Box

One box cannot describe a character well. A single rectangle around a whole sprite always includes empty air beside the arms and above the shoulders, and it misses the shape of a crouch or a jump. Two or three boxes do the job better: one for the torso, one for the head, and one for the legs, each sized to its own body part. When the character crouches, the head box drops and the leg box shrinks. If the sprite is too large to see whole, the Image Resizer tool scales it down before you upload it.

What Can You Do With Game Collision Box Editor?

Game Collision Box Editor fits any 2D game that draws its characters as sprites. These are the jobs it handles best.

Shape The Body Box For A Platform Hero

A platform hero runs, jumps, and falls, and the body box decides whether the hero lands on a ledge or slips off it. Draw the box tight around the torso and legs, a little narrower than the art so the hero can squeeze past walls, and test it against the platforms in your level. A hero whose box is one pixel too wide will catch on every corner, so the numbers matter here.

Mark Attack Reach For A Fighting Move

A fighting move needs two boxes: a hurtbox on the body that can be hit, and an attack box on the fist or the weapon that can hit. Add a box named Punch, place it over the fist at full extension, and size it to the reach. The gap between the body box and the punch box is the range of the move, and changing that gap by ten pixels changes which attacks trade and which ones win. Name each box clearly, so the export reads well in code.

Tighten Boxes For Small Enemy Sprites

Small enemies are the hardest to box well, because a few pixels are a large share of the whole sprite. A 32 pixel enemy with a box four pixels too wide is wrong by an eighth of its body, and the player will feel it. Type the numbers instead of dragging. A tight box makes a small enemy feel hittable without making it feel huge, and it keeps the fight fair when ten of them crowd the screen. For enemy art saved as PNG, the PNG to JPG tool converts it when a smaller file is needed.

Every job ends the same way: a JSON file with named boxes and exact numbers, ready for your game.

Advertisement

Quality And Settings

Five settings shape the boxes, and each one is simple to set.

  • Sprite canvas: fixed at 240 by 240 pixels, with the demo character drawn in and any uploaded image scaled to fit.
  • Box name: up to 40 characters, such as Body, Head, Punch, or Legs, and it travels with the box into the JSON.
  • Box position: x and y in pixels from the top-left corner of the sprite, typed or dragged, clamped inside the canvas.
  • Box size: width and height in pixels, at least 1 by 1, typed or resized by the corner handles.
  • Box count: up to 20 boxes on one sprite, with one Body box prefilled at x 90, y 60, width 60, height 120.

The 20 box limit keeps the list readable and the export small. A sprite that needs more than 20 boxes is usually several sprites sharing one sheet. When the JSON must feed another format, the JSON to CSV tool turns the downloaded file into rows.

How Game Collision Box Editor Draws And Exports Boxes

The editor draws the sprite on a canvas, then draws each box as a coloured outline over it, with corner handles on the selected box and the box name above it. Dragging inside a box moves it, dragging a corner handle resizes it from that corner, and typing in the box list sets the same numbers exactly. Every change redraws the canvas at once, so what you see is always what the export will contain. The demo sprite is drawn in code, so the page works before any file is chosen. When an uploaded image is used, it is drawn to fit the same canvas. The Image Compressor tool shrinks a large sprite before upload when the file is heavy.

Two honest limits are worth knowing. First, the boxes are rectangles, not polygons: a round shield or a diagonal sword cannot be traced exactly, so use two or three rectangles that cover the shape. Second, the export is plain JSON with names and numbers, not a file for one game engine, so your game code reads the numbers and builds its own colliders.

Privacy

Everything you draw stays in your browser. Game Collision Box Editor runs on your own computer, and nothing you upload is sent to a server, stored, or shared. The tool draws the sprite and the boxes locally, and that is all it does.

Because no account is needed, there is no name, email, or history tied to what you do. Closing the tab ends the session, and the browser clears the sprite and the boxes from memory. Your game art stays yours.

Tips

A few habits make Game Collision Box Editor work smoother.

  • Start from the demo sprite to learn the drag and resize moves before uploading your own art.
  • Make the box slightly smaller than the art, never larger, so near misses feel fair.
  • Type the numbers for small sprites, because a drag of one pixel matters more there.
  • Name every box by its job, such as Head or Punch, so the JSON reads clearly in code.
  • Export after each big change, so a good set of boxes is saved before the next experiment.

When the boxes hug the solid art and the names say what each box does, the export is ready for your game. The QR Code Generator tool turns a sheet link into a code a phone can scan.

More Tools For The Same Job

These tools handle the same kinds of jobs: sprites, grids, levels, and game data.

FAQ

Common questions about hitboxes and this editor, answered plainly.

Is Game Collision Box Editor By TechnSols Free?

Yes, Game Collision Box Editor by TechnSols is completely free to use, with no account, no sign-up, and no usage limit. You can edit as many sprites as you like, and everything runs in your browser, so nothing is uploaded or stored anywhere.

What Does The Exported JSON Contain?

The JSON lists the sprite size, 240 by 240, and every box with its name, x, y, width, and height in pixels. The default Body box exports as x 90, y 60, width 60, height 120. Your game code reads those numbers and builds its own colliders from them.

Can I Use My Own Sprite Image?

Yes, upload a PNG, JPG, or WebP image and it replaces the demo sprite on the canvas. The file is checked by extension and magic bytes, and files over 100 MB are refused. Your boxes still measure in pixels from the top-left corner.

Why Are Hitboxes Rectangles And Not Polygons?

Rectangles are the fastest collision shape a game can test, needing only a few number comparisons per pair, so hundreds of boxes can be checked every frame. Polygons cost more time and add edge cases, so most 2D games start with rectangles. The Canvas API guide explains how browsers draw shapes like these.

What Is The Difference Between A Hitbox And A Hurtbox?

A hitbox is the active region of an attack, the part that can deal damage, while a hurtbox is the vulnerable region of a body, the part that can receive damage. This editor draws both as named rectangles. A Hitbox is the invisible shape a game uses to decide when two things touch.

Draw the box, check the numbers, and export the JSON. A game that measures what the player sees is a game that feels fair.

Follow TechnSols on Google
Add TechnSols as a preferred source to see more of our tools in Google Search.
Add to Preferred Sources
Advertisement