How do I allow my local web page access to LocalStorage in Brave Browser?

There is 2 ways you can achieve this. Probably also depends how you run your project. I use VS Code and when I run my projects in Brave I got that error. My files were just in a dev directory not in the wwwroot directory.

  1. First option (recommended in my opinion)

    • Go to: Setting->Additional Settings->Privacy and Security->Site Settings->Cookies
    • In the "Allow" section add: "localhost" and "127.0.0.1" Preferred option
  2. Second option (not recommended, as you also stated you don't want to do this)

    • Go to: Settings->Shields->Cookie Control
    • Select "Allow all cookies" Not recommended option

Hope this helps


You can whitelist file:///* in brave://settings/content/cookies

Sadly it doesn't seem possible to make this rule more specific to only allow some local web pages access to cookies. And even worse, all local web pages share cookies with each other.

But for testing purposes it should be fine.

Obviously it would make more sense to setup a local web server though.