# long url problem with biblatex and hyperref [duplicate]

There were some hits for my problem but did not answer fully.

I found out the PassOptions... command to get rid of some options clash with url and hyperref packages here

Forcing linebreaks in \url does not work with biblatex and menukeys

I have the below MWE with two options where I am using biblatex.

One is with hyperref and the other without. The one without hyperref works fine and the url information is broken correctly but the one with hyperref does not work. It leaves the link as a one long line with the box. I could not really find a fix for this. What is missing from the implementation with hyperref?

\documentclass[10pt]{article}
% % option 1
% %
% % that works without hyperref
% % and the links I used as in the rest of my thesis
% % the long line is broken correctly without using
% % hyphens option with the url package
% \usepackage[backend=bibtex,backref,style=numeric,
%             sorting=nyt,firstinits=true,maxbibnames=99]{biblatex}
% \usepackage{xcolor}
% % the test
% \title{Test document}
% \begin{document}
% this\cite{nvh_BK} is a test.
% \printbibliography
% % end of option 1

% option 2
% with hyperref package
% I found out that I have to use the
% PassOptionsToPackage before the biblatex definitions
%
\PassOptionsToPackage{hyphens}{url}
%
\usepackage[backend=bibtex,backref,style=numeric,
sorting=nyt,firstinits=true,maxbibnames=99]{biblatex}
\usepackage{hyperref}
\usepackage{xcolor}
\hypersetup{
urlcolor     = blue,    % Colour for external hyperlinks
citecolor    = red,     % Colour of citations
pdfborder = { 0 0 1 },  % Border for pdf
linkbordercolor = blue, % Border color
citebordercolor = red,
}
% test
\title{Test document}
\begin{document}
this\cite{nvh_BK} is a test.
\printbibliography
% end of option 2
\end{document}


test bib file I used with one entry is as follows:

@online{nvh_BK,
author = {Bruel\&Kjaer},
title = {Vehicle noise vibration and harshness development},
year = 2019,
url = {https://www.bksv.com/en/Applications/vehicle-noise-vibration-and-harshness-development-test-test-test},
urldate = {2019-05-10}
}


## marked as duplicate by moewe biblatex StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jul 29 at 6:28

• Try \usepackage{xurl} before biblatex – CarLaTeX Jul 27 at 14:03