Skip to Content
key-conceptsWeb Standards

Last Updated: 3/9/2026


Web Standards

Hono is built entirely on Web Standards. This fundamental design decision makes Hono universal, future-proof, and compatible with any JavaScript runtime.

What Are Web Standards?

Web Standards are APIs defined by web specifications that work consistently across browsers and JavaScript runtimes. They include:

  • Request — Represents an HTTP request
  • Response — Represents an HTTP response
  • Headers — HTTP headers collection
  • URL — URL parsing and manipulation
  • URLSearchParams — Query string handling
  • fetch — Making HTTP requests
  • ReadableStream — Streaming data

These APIs originated in browsers but are now supported by modern JavaScript runtimes.

The Standard Server

A simple server using only Web Standards:

export default { async fetch(request: Request): Promise<Response> { return new Response('Hello World') }, }

This code runs on:

  • Cloudflare Workers
  • Deno
  • Bun
  • Fastly Compute
  • Vercel Edge Runtime
  • And more!

Why Web Standards Matter

Universal Compatibility

The same Hono code runs everywhere:

import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello!')) // Works on Cloudflare Workers export default app // Works on Deno Deno.serve(app.fetch) // Works on Bun export default { port: 3000, fetch: app.fetch, }

No Polyfills Needed

Hono has zero dependencies because it uses only Web Standards. This means:

  • Smaller bundle size — No polyfill overhead
  • Faster cold starts — Less code to parse
  • Better security — Fewer dependencies to audit
  • Future-proof — Standards evolve with the platform

Runtime Flexibility

Choose the best runtime for your use case:

  • Cloudflare Workers — Global edge network
  • Deno — Secure by default
  • Bun — Extreme performance
  • Node.js — Mature ecosystem (with adapter)
  • Fastly Compute — Enterprise edge
  • AWS Lambda — Serverless functions

Switch runtimes without rewriting your application.

Supported Runtimes

Hono officially supports:

Native Web Standard Runtimes

  • Cloudflare Workers (workerd)
  • Cloudflare Pages
  • Deno
  • Bun
  • Fastly Compute
  • Vercel Edge Runtime
  • Netlify Edge Functions
  • AWS Lambda (with streaming response)
  • Lambda@Edge

With Adapters

Experimental

  • WebAssembly (WASI) — Via wasi:http 
  • Service Workers

WinterCG: Web-interoperable Runtimes

Hono follows the WinterCG  (Web-interoperable Runtimes Community Group) initiative.

WinterCG is a collaboration between:

  • Cloudflare
  • Deno
  • Shopify
  • Vercel
  • And others

Their goal: Enable web-interoperability across JavaScript runtimes using Web Standards.

Hono aims to be the Standard for Web Standards — the framework that works everywhere.

Request and Response Objects

Hono uses standard Request and Response objects:

Request

app.get('/example', async (c) => { const request = c.req.raw // Standard Request object // Standard properties const method = request.method const url = request.url const headers = request.headers // Standard methods const body = await request.json() const text = await request.text() const formData = await request.formData() return c.text('OK') })

Response

app.get('/example', (c) => { // Hono helpers create standard Responses return c.json({ ok: true }) // Equivalent to: return new Response( JSON.stringify({ ok: true }), { status: 200, headers: { 'Content-Type': 'application/json' }, } ) })

Streaming with Web Standards

Hono supports standard ReadableStream:

import { stream } from 'hono/streaming' app.get('/stream', (c) => { return stream(c, async (stream) => { for (let i = 0; i < 10; i++) { await stream.write(`Chunk ${i}\n`) await stream.sleep(100) } }) })

Learn more in the Streaming Helper documentation.

Headers API

Standard Headers object:

app.get('/example', (c) => { const headers = new Headers() headers.set('X-Custom', 'value') headers.append('Set-Cookie', 'session=abc') headers.append('Set-Cookie', 'user=123') return c.text('OK', 200, headers) })

URL and URLSearchParams

Standard URL parsing:

app.get('/example', (c) => { const url = new URL(c.req.url) console.log(url.protocol) // 'https:' console.log(url.hostname) // 'example.com' console.log(url.pathname) // '/example' const params = url.searchParams const page = params.get('page') // Query param return c.text('OK') })

fetch API

Make requests using standard fetch:

app.get('/proxy', async (c) => { const response = await fetch('https://api.example.com/data') const data = await response.json() return c.json(data) })

No need for axios or other HTTP clients.

Benefits of Web Standards

For Developers

Learn once, use everywhere — Same APIs in browser and server
No framework lock-in — Standard APIs are portable
Better documentation — MDN covers all Web Standards
Future-proof — Standards evolve with the platform

For Applications

Smaller bundles — No polyfills or shims
Better performance — Native implementations are fast
Easy testing — Use browser testing tools
Runtime portability — Switch platforms easily

Philosophy: Standard of the Web Standards

Hono’s mission is to become the Standard for Web Standards:

  • ✅ Use only Web Standard APIs
  • ✅ Work on all Web Standard runtimes
  • ✅ Provide the best developer experience
  • ✅ Lead the ecosystem toward interoperability

This philosophy guides every design decision in Hono.

What’s Next

Understand routers: Learn about Routers and how Hono achieves extreme performance.

Learn middleware: Read about Middleware and the request/response flow.

Deploy anywhere: Check out Deployment guides for different platforms.

See the philosophy: Read Motivation to understand why Hono was created.