Implementation of BIP39, I want to generate a BIP39 512-bits seed from 12 mnemonics but failed
Just as a side note: What you get from 12 words is a seed of 512 bit length because it was stretched with PBKDF2. The entropy is only 128 bit with 12 words (each word represents 11 bits of information ~= 132 bit with 4 bit checksum).

If you look at a library like https://github.com/bitcoinjs/bip39/blob/master/src/index.js for example, you see that the spaces between the words aren't removed. If you paste the original words into the PBKDF2 tool you get the correct seed.