Skip to content
Go to file
This branch is 16 commits ahead of gseguin:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

A simple, tiny, nicely embeddable HTTP 1.0 (partially 1.1) server in Java Adapted for Android!

NanoHTTPD version 1.25 (android edition),

Copyright (c) 2001,2005-2012 Jarno Elonen (,

Copyright (c) 2010 Konstantinos Togias (,

Copyright (c) 2012 Andrew Brampton (

Features & limitations

  • Only one Java file
  • Released as open source, Modified BSD licence
  • No fixed config files, logging, authorization etc. (Implement by yourself if you need them.)
  • Supports parameter parsing of GET and POST methods (+ rudimentary PUT support in 1.25)
  • Supports both dynamic content and file serving
  • Supports file upload (since version 1.2, 2010)
  • Supports partial content (streaming)
  • Supports ETags
  • Never caches anything
  • Doesn't limit bandwidth, request time or simultaneous connections
  • Default code serves files and shows all HTTP parameters and headers
  • File server supports directory listing, index.html and index.htm
  • File server supports partial content (streaming)
  • File server supports ETags
  • File server does the 301 redirection trick for directories without '/'
  • File server supports simple skipping for files (continue download)
  • File server serves also very long files without memory overhead
  • Contains a built-in list of most common mime types
  • All header names are converted lowercase so they don't vary between browsers/clients

Ways to use

  • Run as a standalone app, serves files and shows requests
  • Subclass serve() and embed to your own program (see for a simple example)
  • Call serveFile() from serve() with your own base directory


A free, simple, tiny (1 java file!), nicely embeddable HTTP server in Java.




No releases published


No packages published


You can’t perform that action at this time.