Annual report pursuant to Section 13 and 15(d)


Cover - USD ($)
12 Months Ended
Dec. 31, 2023
Mar. 15, 2024
Jun. 30, 2023
Document Type 10-K    
Amendment Flag false    
Document Annual Report true    
Document Transition Report false    
Document Period End Date Dec. 31, 2023    
Document Fiscal Period Focus FY    
Document Fiscal Year Focus 2023    
Current Fiscal Year End Date --12-31    
Entity File Number 001-37937    
Entity Registrant Name XENETIC BIOSCIENCES, INC.    
Entity Central Index Key 0001534525    
Entity Tax Identification Number 45-2952962    
Entity Incorporation, State or Country Code NV    
Entity Address, Address Line One 945 Concord Street    
Entity Address, City or Town Framingham    
Entity Address, State or Province MA    
Entity Address, Postal Zip Code 01701    
City Area Code 781    
Local Phone Number 778-7720    
Entity Well-known Seasoned Issuer No    
Entity Voluntary Filers No    
Entity Current Reporting Status Yes    
Entity Interactive Data Current Yes    
Entity Filer Category Non-accelerated Filer    
Entity Small Business true    
Entity Emerging Growth Company false    
Entity Shell Company false    
Entity Public Float     $ 5,026,928
Entity Common Stock, Shares Outstanding   1,540,684  
Documents Incorporated by Reference [Text Block] Information required in response to Part III of Form 10-K (Items 10, 11, 12, 13 and 14) is hereby incorporated by reference to portions of the registrant's definitive proxy statement for its 2024 Annual Meeting of Stockholders, information statement or an amendment to this Annual Report on Form 10-K. The registrant intends to file a definitive proxy statement, information statement or an amendment to this Annual Report on Form 10-K with the Securities and Exchange Commission no later than 120 days after the end of the registrant's fiscal year ended December 31, 2023.    
ICFR Auditor Attestation Flag false    
Document Financial Statement Error Correction [Flag] false    
Auditor Firm ID 688    
Auditor Name Marcum LLP    
Auditor Location Boston, Massachusetts    
Common Stock, $0.001 par value per share      
Title of 12(b) Security Common Stock, $0.001 par value per share    
Trading Symbol XBIO    
Security Exchange Name NASDAQ    
Purchase Warrants      
Title of 12(b) Security Purchase Warrants    
Trading Symbol XBIOW    
Security Exchange Name NASDAQ