Laravel Browsable API

Laravel Browsable API

2018 – PresentSee live
Steve on X

Django REST Framework's browsable API means opening an endpoint in your browser gets you a readable page you can click around, not a wall of JSON. Laravel had nothing like it, so I built it. Install the package, and API responses requested by a browser come back as pretty-printed, linked HTML, with the path as breadcrumbs, while everything else still gets JSON.

It's on Packagist, with over 20,000 installs.

Laravel Browsable API

How it works

A middleware on Laravel's api group wraps a response only when the browser asks for HTML and it isn't HTML already. It's on whenever debug is, can be switched with an environment variable, and its formatting and templates can be replaced. In 2026 I brought it up to Laravel 12 and 13 and PHP 8.2 to 8.5, with Pest tests at 100% coverage, and releases that publish themselves.