Use Fiddler with Basic Authentication to access RESTful WebAPI

Fiddler has a tool that does the Base64 for you. Just create your string: username:password and then go to Tools -> TextWizard and enter the username password combo and choose ToBase64. Copy and paste that into your Authorization header and you should be good to go.


AlexGad is right. Once the ToBase64 encoding is created, under the header while composing the request, add the following line:

Authorization: Basic [encoded_value]

Now execute the request, it should work! :)


Newer versions of Fiddler (I tested in v4.6.20172.31233) will create and add the necessary Authorization header for you automatically if you specify the username and password in the Composer URL field like so:

https://SomeUser:SomePass@sitename

Upon executing, this strips it out of the URL and turns into an HTTP header like:

Authorization: Basic U29tZVVzZXI6U29tZVBhc3M=

I know this is an older post but when I first was looking at how to do this I came across this post and knew it was the answer but I still didn't know things like did the credentials need to be coma separated etc. So, just in case this might help someone out here are my notes for Fiddler I put together for a JSON POST.

First you need to Base64 encode your "username:password"
    • Go to Tools | Text Wizard | To Base64 in dropdown

Post a message in the Composer tab
    • Change the type to POST in the dropdown.
    • Put in the URL
    • Add the following to the top header section.
        ○ Authorization: Basic ReplaceWithYourEncodedCredtials=
        ○ Content-Type: application/json; charset=utf-8
    • Add some JSON content to the body
        ○ [{"Address1":null,"Address2":null,"BirthDate":"1967-10-06T00:00:00","City":null,"CompanyHireDate":"2011-06-03T00:00:00","EmailAddress":"[email protected]","EmployeeNumber":"112233","FirstName":"JOHN","LastName":"DOE","PhoneNumber":null,"State":null,"UserName":"JDoe","ZipCode":null}]