Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8228221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:23:28+00:00 2026-06-07T16:23:28+00:00

I am encoding the URL suffix of my application: $url = ‘subjects?_d=1’; echo base64_encode($url);

  • 0

I am encoding the URL suffix of my application:

$url = 'subjects?_d=1';
echo base64_encode($url);

// Outputs
c3ViamVjdHM/X2Q9MQ==

Notice the slash before ‘X2’.

Why is this happening? I thought base64 only outputted A-Z, 0-9 and ‘=’ as padding?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:23:29+00:00Added an answer on June 7, 2026 at 4:23 pm

    No. The Base64 alphabet includes A-Z, a-z, 0-9 and + and /.

    You can replace them if you don’t care about portability towards other applications.

    See: http://en.wikipedia.org/wiki/Base64#Variants_summary_table

    You can use something like these to use your own symbols instead (replace - and _ by anything you want, as long as it is not in the base64 base alphabet, of course!).

    The following example converts the normal base64 to base64url as specified in RFC 4648:

    function base64url_encode($s) {
        return str_replace(array('+', '/'), array('-', '_'), base64_encode($s));
    }
    
    function base64url_decode($s) {
        return base64_decode(str_replace(array('-', '_'), array('+', '/'), $s));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not much of a PHP expert. I'm encoding a URL with base64_encode .
Is there a URL encoding function in XSLT version 1? I need something similar
I have a large url that I am encoding using System.Web.HttpUtility.UrlEncode. When I encode
I noticed that Wikipedia uses percent encoding for the path section of a URL,
I know this is a fairly common error with URL encoding. The problem I
How to do URL encoding in NSURL ? Thanks
I'm passing a string from one page to another, is the url encoding necessary
Possible Duplicate: PHP URL encoding retaining invalid url characters I use a form similiar
I am building a web-store that uses URL encoding extensively. I have a list
Looks like iOS 5.1 has broken the standard URL encoding for navigating a user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.