Supabase Error EntityTooLarge: Upload Exceeds Maximum Object Size

Supabase error EntityTooLarge (Upload Exceeds Maximum Object Size) explained: what it means, why it happens, and how to fix it — with copy-paste code examples.

Error code EntityTooLarge Supabase Last verified 2026-08-19

Quick Answer

Check file.size <= 52428800 bytes before calling upload(). If that does not apply, compress images (WebP/AVIF) or transcode video before upload — the full checklist is below.

Error Code

Error code: EntityTooLarge
Official name: Upload Exceeds Maximum Object Size
Service: Supabase

What does this error mean?

Your proposed upload exceeds the maximum allowed object size.

Common Causes

How to Fix

  1. Check file.size <= 52428800 bytes before calling upload()
  2. Compress images (WebP/AVIF) or transcode video before upload
  3. Split large datasets into multiple smaller objects
  4. For files over 50 MB, use external object storage or a CDN pipeline
  5. Upgrade plans only helps storage capacity - the 50 MB per-object cap applies across plans

Code Examples

Client-side size guard javascript
function assertUploadable(file) {
  const MAX_BYTES = 50 * 1024 * 1024 // 50 MB
  if (file.size > MAX_BYTES) {
    throw new Error('File exceeds the 50 MB storage limit')
  }
}

assertUploadable(file)
await supabase.storage.from('uploads').upload(file.name, file)

Catching the 50 MB limit before the request keeps users out of 413-error territory.

Framework-Specific Fixes

supabase-js

Validate size client-side so users see a friendly error instead of a 413.

const MAX = 50 * 1024 * 1024 // 50 MB
if (file.size > MAX) {
  showError('File must be under 50 MB')
  return
}
await supabase.storage.from('uploads').upload(path, file)

You Might Also Like

Frequently Asked Questions

Why am I seeing Supabase error EntityTooLarge?

Most often this happens when uploading a file larger than the 50 MB per-object storage limit, or when video or asset uploads bypassing client-side size checks.

How do I fix Supabase error EntityTooLarge?

Check file.size <= 52428800 bytes before calling upload().

Which frameworks have documented fixes for error EntityTooLarge?

This page documents fixes for: supabase-js.

Official Sources

This page is based on the official Supabase documentation linked below and adds practical troubleshooting guidance on top.