🎮 Funsoft Free games & tools🌐 English · 한국어
← Error fixes

Unexpected token < in JSON

You expected JSON but got HTML

🔎 What you'll see

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

🤔 Why it happens

Your code expected JSON data, but the server sent back HTML (usually a 404/500 error page or a login page). The "<" in the error message is the start of that HTML.

🛠️ How to fix it

  1. Paste the request URL into the address bar. If you see an HTML page, the address is wrong or the server has an error.
  2. Check the API URL for typos, a missing slash (/) or a wrong path.
  3. On your live server, the API path may differ from development (e.g. there's no /api).
  4. Add code that checks response.ok and status from fetch before reading the JSON.

🤖 What to ask your AI

Replace the parts in [ ] with your own details, then paste it in.

I'm fetching JSON but get an 'Unexpected token <' error. The request URL is [URL] and my code is [code]. Tell me how to track down the cause, and give me code that checks the response status first.

Other errors

More free games & tools
🗂️ Games by Genre📅 Daily Challenge🇰🇷 Learn Hangul🎵 Beat Cube Dash🧩 Block Puzzle🏮 Lantern Night (Survivor)🪱 Worm Battle (Worm IO)🕳️ Hole IO Game (Black Hole Town)🛡️ Steel Evolution (Tank IO)⛄ Snowball Roll IO🎄 Christmas Games🎅 Santa Gift Delivery🎄 Decorate a Christmas Tree🚪 Advent Calendar 2026❄️ Snowball Fight🏰 Prism Keep (Tower Defense)⚔️ Three Kingdoms Idle📊 Stock Market Simulator🎲 Yut Nori🏮 Korean Traditional Games🍯 Dalgona Candy Game🌺 Red Light, Green Light♞ Chess vs Computer🀄 Janggi (Korean Chess)🃏 Solitaire🂡 Blackjack🔼 Hi-Lo💣 Minesweeper⚫ Gomoku (Omok)🥁 Beat King (Rhythm Game)🎵 Neon Lane (4 Key Rhythm Game)🎹 Piano Tiles Game🎹 Online Piano🪜 Endless Stairs⚽ Penalty Shootout🏓 Ping Pong (Table Tennis)🎳 Bowling🏀 Basketball Shooting🏹 Archery⛳ Mini Golf🏎️ Drift Racing🏁 Kart Racing🏍️ Hill Climb Motorbike🚌 Bus Driver🅿️ Car Parking🚗 Car Escape Puzzle🐔 Road Crossing 3D✏️ One Line Puzzle🎲 Yacht Dice🎱 Marble Race Name Picker🥌 Alkkagi🔍 Spot the Difference🪩 Pinball💥 Artillery Game✈️ Plane Shooter (Sky Interceptors)👹 Maze Chase (Dokkaebi Maze)🧟 Zombie Survival Game🫧 Cell Grow IO🐟 Fish Eat Fish🐠 Virtual Aquarium🀄 Shisen-Sho🌸 Puff Garden (Match-3)🎴 Go-Stop (Matgo)⚫ Go (Baduk)🃏 One Card🍝 Italian Brainrot Quiz🎃 Halloween Candy Catch🎋 Bamboo Chop🔢 2048🍉 Suika Game (Watermelon)🧱 Brick Breaker🐍 Snake🦖 Dino Evolution🔢 Sudoku🧩 Jigsaw Puzzles🌀 Maze Game⚡ Reaction Time Test🎨 Color Test🖍️ Coloring Pages🔎 Hidden Object Games🎯 Bingo Card Generator🎈 Hangman Game🧠 IQ Test (Just for Fun)🖱️ CPS Test🖱️ Mouse Test✌️ Double Click Test⌨️ Keyboard Tester🎙️ Mic Test📷 Webcam Test🔊 Left Right Speaker Test🎧 Online Hearing Test🎥 Screen Recorder🎞️ GIF Maker🟥 Dead Pixel Test🖥️ Refresh Rate Test🎞️ FPS Test📐 What Is My Screen Resolution?👆 Touch Screen Test📏 Mouse DPI Test📡 Polling Rate Test🎹 Key Rollover Test🎮 Gamepad Tester⌨️ Spacebar Counter🎯 Sensitivity Converter🧮 eDPI Calculator🔭 FOV Calculator➕ Crosshair Generator🔴 Aim Trainer⌨️ Auto Key Presser🤖 Auto Clicker✦ Special Characters𝒜 Fancy Text Generator🔳 QR Code Generator🔐 Password Generator🧰 Image & PDF Tools📱 HEIC to JPG📐 Resize Image🔄 Image Converter✂️ Crop Image📚 Merge PDF📄 Split PDF🖨️ Images to PDF🖼️ Image Compressor🧾 JSON Formatter🔤 Base64 Encoder / Decoder🎨 Color Picker & Converter⏲️ Online Timer📅 Days Until Calculator🥁 Online Metronome🎲 Random Number Generator🎡 Spin the Wheel🏇 Horse Race Game📏 Unit Converter💵 Tip Calculator💯 Percentage Calculator⚖️ BMI Calculator✍️ Your Name in Korean🎂 Korean Age Calculator🐉 Korean Zodiac Calculator🪪 Korean Name Generator💬 Korean Phrases for Travelers🗓️ South Korea Public Holidays🎧 Vibe Coding Guide🖋️ Verified Quotes🎁 Roblox Codes🗺️ Roblox Game Guides📊 Roblox Top Games Chart🎃 Roblox Halloween 2026🥚 Steal An Egg Pets📚 Roblox Item Database

© Funsoft · funsoft.app · All English games & tools · 한국어로 보기